import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-09
 * Time:19:05
 */
public class main2 {
    public static void print(int[] array)
    {
        array[0]=20;
        for(int t:array)
        {
            System.out.print(t+" ");
        }
    }
    public static void print2(int[] array)
    {
        array=new int[]{4,5,6,7,8,9};
        System.out.println("函数内："+Arrays.toString(array));

    }
    public static void main(String[] args) {
        int[] array={1,2,3,4,5,6};
        int[] array1=array;
       String fw= Arrays.toString(array);
        System.out.println(fw);
        array[0]=99;
        String f= Arrays.toString(array);
        System.out.println(f);
        //---------------------
        print(array);
        System.out.println("\n"+array[0]);
        System.out.println("------------------");
        System.out.println("函数前："+Arrays.toString(array));
        print2(array);
        System.out.println("函数后："+Arrays.toString(array));

    }
}
